/**
 * File: g:\vue\vue-element-admin\src\api\group.js
 * Created Date: '2019-01-20 1:34:54
 * Author: 魏巍
 * -----
 * Last Modified: '2019-01-20 3:18:49
 * Modified By: 魏巍
 * -----
 * Copyright (c) 2019 魏巍
 * ------------------------------------
 * Javascript will save your soul!
 */

import request from '@/utils/request'

export function list(params) {
  return request({
    url: '/admin',
    method: 'get',
    params: params
  })
}

export function put(id, status) {
  return request({
    url: `/admin/${id}?status=${status}`,
    method: 'put'
  })
}

export function edit(id) {
  return request({
    url: `/admin/${id}/edit`,
    method: 'get'
  })
}

export function save(data) {
  return request({
    url: `/admin`,
    method: 'post',
    data: data
  })
}

export function del(id) {
  return request({
    url: `/admin/${id}`,
    method: 'delete'
  })
}

export function group(params) {
  return request({
    url: `/group`,
    method: 'get',
    params: params
  })
}

